- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback!
Codeblocks are used in technical documentation to set off blocks of code or programming language from the rest of the text. They are used to clearly show examples of how to write code or to explain how a particular programming concept works.
Codeblocks are typically formatted differently from the rest of the text, using a monospaced font and syntax highlighting to make the code easier to read and understand. A copy option would be available to easily reuse it in the desired space.
Example:
def greet(name):
print("Hello, " + name)
greet("John")
The syntax highlighting and monospaced font help readers understand the code.
Was this article helpful?